package com.zjitc.dao;

import com.zjitc.model.User;
import org.apache.ibatis.annotations.Param;

/**
 * Create by IntelliJ IDEA
 *
 * @author: jsonor
 * @date-Time: 2018/4/17 17:05
 * @description:
 */
public interface UserDao {

  Integer register(User user);

  Integer isNotUsername(String username);

  User findByUsernameAndPassword(
      @Param("username") String username,
      @Param("password") String password
  );

  User findByUsername(String username);

  Integer updateInfo(
          @Param("username") String username,
          @Param("password") String password,
          @Param("phone") String phone,
          @Param("address") String address,
          @Param("email") String email
  );

  String userEmail(String username);

  Integer updatePasswordByUuid(
      @Param("password") String password,
      @Param("uuid") String uuid
  );

  Integer updateUUID(
      @Param("username") String username,
      @Param("uuid") String uuid
  );
}
